package com.boby.lib_common.util;

public class ByteUtil {
    /**
     * byte[2] 转 unsignedShort
     *
     * @param low
     * @param high
     * @return
     */
    public static int byte2UnsignedShort(byte low, byte high) {
        return (high << 8 | low);
    }

    /**
     * byte[2] 转 short
     *
     * @param low
     * @param high
     * @return
     */
    public static short byte2Short(byte low, byte high) {
        return (short) ((low & 0xFF) | (high << 8));
    }

}
